package test4_11.demo04;

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class Homework21_5 {

    public static void main(String[] args) throws FileNotFoundException {

        //通过Scanner读两句话,并写到一个文件中.通过PrintWriter来实现
        Scanner sc = new Scanner(System.in);
        System.out.println("输入两句话：");
        String a = sc.next();
        String b = sc.next();

        PrintWriter pw = new PrintWriter("D://a.txt");
        pw.println(a);
        pw.println(b);

        pw.close();
    }

}
